/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ejb;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author timoteus78
 */
@Embeddable
public class ReviewPK implements Serializable {
    @Column(name = "rID", nullable = false)
    private short rID;
    @Column(name = "mID", nullable = false)
    private short mID;

    public ReviewPK() {
    }

    public ReviewPK(short rID, short mID) {
        this.rID = rID;
        this.mID = mID;
    }

    public short getRID() {
        return rID;
    }

    public void setRID(short rID) {
        this.rID = rID;
    }

    public short getMID() {
        return mID;
    }

    public void setMID(short mID) {
        this.mID = mID;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) rID;
        hash += (int) mID;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ReviewPK)) {
            return false;
        }
        ReviewPK other = (ReviewPK) object;
        if (this.rID != other.rID) {
            return false;
        }
        if (this.mID != other.mID) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "ejb.ReviewPK[rID=" + rID + ", mID=" + mID + "]";
    }

}
